package com.ctrip.payment.test.ngtest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.*;

import java.util.concurrent.TimeUnit;

public class NGTestException {

    private static final Logger logger = LoggerFactory.getLogger(NGTestException.class);

    @BeforeSuite
    public void beforeSuite() {
        logger.info("beforeSuite");
    }

    @AfterSuite
    public void afterSuite() {
        logger.info("afterSuite");
    }

    @BeforeClass
    public void beforeClass() {
        logger.info("BeforeClass");
    }

    @AfterClass
    public void AfterClass() {
        logger.info("AfterClass");
    }

    @BeforeTest
    public void BeforeTest() {
        logger.info("BeforeTest");
    }

    @AfterTest
    public void AfterTest() {
        logger.info("AfterTest");
    }

    @BeforeMethod
    public void BeforeMethod() {
        logger.info("BeforeMethod");
    }

    @AfterMethod
    public void AfterMethod() {
        logger.info("AfterMethod");
    }

    @Test(expectedExceptions = ArithmeticException.class)
    //@Test
    public void testExceptions() {
        int a = 1;
        int b = 0;
        int c = a / b;
    }

}
